import mindspore.nn as nn
import numpy as np
import mindspore.ops as ops
import mindspore as ms


class Net(nn.Cell):
    def __init__(self):
        super(Net, self).__init__()
        self.pow = ops.Pow()
        def construct(self, x,y):
            output = self.pow(x, y)
            return output
net = Net()
x = ms.Tensor(np.array([1.0, 2.0, 4.0]), ms.float64).astype(ms.float32)
y = 3.0
output = net(x, y)
print('output', output)
